﻿using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("WebAppRolePermissions")]
    public class RolePermission : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [References(typeof(Role))]
        public long RoleId { get; set; }

        [References(typeof(Menu))]
        public long MenuId { get; set; }

        [Required]
        [Default(typeof(int), "0")]
        public PermissionType Permission { get; set; }
    }
}